import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from "@angular/router";

@Component({
  selector: 'app-register-success',
  templateUrl: './register-success.component.html',
  styleUrls: ['./register-success.component.scss']
})
export class RegisterSuccessComponent implements OnInit {
  userName: any;
  telephone: any;
  constructor(private activatedRouter: ActivatedRoute, private router: Router) { }

  ngOnInit(): void {
    this.activatedRouter.queryParams.subscribe(queryParams => {
      this.userName = queryParams['userName']
      this.telephone = queryParams['telNum']
    })
  }

  submit(type) {
    if (type == 1) {
      this.router.navigate(["/userVerification"]);
    }
    else {
      this.router.navigate(["/home"]);
    }
  }
}
